#include <iostream>
#include <cmath>

using namespace std;

int isprime(int m)
{
    int i,d=0;
    double n;

    n=m;
    n=int(sqrt(n));

    for (i=2;i<=n;i++)
    {
        if (m%i==0)
        {
            d=1;
            break;
        }

    }

    if(d==0)
        return 1;
    else return 0;

}

int main ()
{
    int num,c;
    cout<<"please enter a number which no less than 2"<<endl;
    cin>>num;

    c=isprime(num);

    if (c==1) cout<<"this number is a prime"<<endl;
    else cout<<"this number is not a prime"<< endl;

    cin>>c;
    return 0;
}

